package com.watchthelan.web.login;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.watchthelan.domain.Administrator;


public class LogoutController implements Controller {
	private final Log logger = LogFactory.getLog(this.getClass());

	public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
		request.getSession().removeAttribute("administrator");
		logger.info("removing administrator from session");		
		return new ModelAndView("logout");
	}
}
